package com.zhanghu.single.ddl_single_model;

/**
 * @Author: zhanghu
 * @Description: 双重检查锁实现单例
 * @Date: Create in 10:40 2020/1/16
 * @modified by:
 */
public class DdlSingleModel {

    private static volatile DdlSingleModel SINGLE;

    private DdlSingleModel() {

    }

    public static DdlSingleModel getSINGLE() {
        if (SINGLE == null) {
            synchronized (DdlSingleModel.class) {
                if (SINGLE == null) {
                    SINGLE = new DdlSingleModel();
                }
            }
        }
        return SINGLE;
    }
}
